@import '../variables.css';
// Steps 组件基础样式
.xwd-steps {
  display: flex;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.5;
  color: rgb(0 0 0 / 85%);

  .ant-steps {
    display: flex;
    align-items: flex-start;
  }

  // 垂直对齐样式
  &-vertical-align {
    .ant-steps-item {
      flex-direction: column;
      align-items: center;
      text-align: center;

      .ant-steps-item-container {
        display: flex;
        flex-direction: column;
        align-items: center;
      }

      .ant-steps-item-content {
        // margin-top: 8px;
      }
    }
  }

  // 步骤项基础样式
  &-item {
    display: flex;
    align-items: flex-start;

    // 禁用状态样式
    &-disabled {
      cursor: not-allowed;
      pointer-events: none;

      .ant-steps-item-title,
      .ant-steps-item-description {
        color: rgb(0 0 0 / 25%) !important;
      }

      .ant-steps-item-icon {
        background-color: #f5f5f5 !important;
        border-color: #d9d9d9 !important;

        .ant-steps-icon {
          color: rgb(0 0 0 / 25%) !important;
        }
      }
    }
  }

  // 处理中状态省略号样式
  &-process-ellipsis {
    .ant-steps-item-process {
      .ant-steps-item-icon {
        &:not(:has(.anticon)) {
          .ant-steps-icon {
            visibility: hidden;
            position: relative;

            &::after {
              content: '...';
              visibility: visible;
              position: absolute;
              top: 0;
              left: 0;
              right: 0;
              bottom: 0;
              display: flex;
              align-items: center;
              justify-content: center;
              font-size: 16px;
              color: #fff;
              height: 16px;
              line-height: 16px;
              margin-top: -3px;
            }
          }
        }
      }
    }
  }

  // 处理中状态图标尺寸样式
  &-process-icon-size {
    .ant-steps-item {
      &-process {
        .ant-steps-item-icon {
          width: 32px;
          height: 32px;
          font-size: 16px;
          line-height: 32px;
        }
      }
    }
  }

  // 同时具有处理中状态图标尺寸和垂直对齐时的样式
  &-process-icon-size.xwd-steps-vertical-align {
    .ant-steps-item-process {
      margin-top: -8px;
      // .ant-steps-item-icon {
      //   margin-top: 0;
      // }
    }
  }

  // 等待状态小圆点样式
  &-wait-dot {
    .ant-steps-item-wait {
      position: relative;
      padding-left: 12px;

      .ant-steps-item-container {
        display: flex;
        align-items: center;

        .ant-steps-item-icon {
          width: 7px;
          height: 7px;
          margin-top: -18px;

          .ant-steps-icon {
            display: none;
          }
        }

        .ant-steps-item-title {
          position: relative;
        }
      }
    }
  }

  // 垂直对齐且等待状态时的样式
  &-vertical-align.xwd-steps-wait-dot {
    .ant-steps-item-wait {
      .ant-steps-item-container {
        .ant-steps-item-icon {
          margin-top: 16px; // 垂直对齐时调整图标位置
        }
      }
    }
  }

  // 完成状态图标样式
  .ant-steps-item-finish .ant-steps-item-icon {
    background-color: var(--xwd-primary);
    border: none;
  }

  .ant-steps-item-finish .ant-steps-item-icon > .ant-steps-icon {
    color: #fff;
  }
}
